﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
namespace HZ.Supervise.Web.Secondphase
{
    public partial class ProcureArea : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                Databing();
            }
        }

        private void Databing()
        {
            //<asp:BoundField DataField="GoodsInfo" HeaderText="流水号" ReadOnly="true" />
            //    <asp:BoundField DataField="ProductName" HeaderText="通用名称" ReadOnly="true" />
            //    <asp:BoundField DataField="MedicineModelName" HeaderText="剂型" ReadOnly="true" />
            //    <asp:BoundField DataField="Outlookc" HeaderText="规格" ReadOnly="true" />
            //    <asp:BoundField DataField="Unit" HeaderText="单位" ReadOnly="true" />
            //    <asp:BoundField DataField="Factor" HeaderText="系数" ReadOnly="true" />
            //    <asp:BoundField DataField="ProcurePrice" HeaderText="采购限价" ReadOnly="true" />
            //    <asp:BoundField DataField="CompanyName_Sc" HeaderText="生产企业" ReadOnly="true" />
            //    <asp:BoundField DataField="PurchaseNumerbTotalc" HeaderText="采购总数量" ReadOnly="true" />
            //    <asp:BoundField DataField="PurchaseAmountTotal" HeaderText="采购总金额" ReadOnly="true" />
            //    <asp:BoundField DataField="LastMonthRanked" HeaderText="上月排名" ReadOnly="true" />
            //    <asp:BoundField DataField="RankedChange" HeaderText="名次变化" ReadOnly="true" />
            DataTable dt = new DataTable();
            DataColumn dc1 = new DataColumn("Areaname", typeof(string)); dt.Columns.Add(dc1);
            DataColumn dc2 = new DataColumn("PurchaseNumerbTotalc", typeof(string)); dt.Columns.Add(dc2);
            DataColumn dc3 = new DataColumn("PurchaseNumerbTotalc_jb", typeof(string)); dt.Columns.Add(dc3);
            DataColumn dc4 = new DataColumn("PurchaseNumerbTotalc_fjb", typeof(string)); dt.Columns.Add(dc4);
            DataColumn dc5 = new DataColumn("PurchaseAmountTotal", typeof(string)); dt.Columns.Add(dc5);
            DataColumn dc6 = new DataColumn("PurchaseAmountTotal_jb", typeof(string)); dt.Columns.Add(dc6);
            DataColumn dc7 = new DataColumn("PurchaseAmountTotal_fjb", typeof(string)); dt.Columns.Add(dc7);
            DataColumn dc8 = new DataColumn("LastMonthRanked", typeof(string)); dt.Columns.Add(dc8);
            DataColumn dc9 = new DataColumn("RankedChange", typeof(string)); dt.Columns.Add(dc9);
            for (int i = 0; i < 10; i++)
            {
                DataRow dr = dt.NewRow();
                dr[0] = "昆明地市" + i.ToString();
                dr[1] = "1000";
                dr[2] = "300";
                dr[3] = "600";
                dr[4] = "90000.000";
                dr[5] = "20000.000";
                dr[6] = "70000.00";
                dr[7] = i.ToString();
                dr[8] = i;
                dt.Rows.Add(dr);
            }

            gvwProcureCatalog.DataSource = dt;
            gvwProcureCatalog.DataBind();
        }

        protected void AspNetPager1_PageChanged(object sender, EventArgs e)
        {

        }

        protected void btnQuery_Click(object sender, EventArgs e)
        {
            AspNetPager1.CurrentPageIndex = 1;
            Databing();
        }

        protected void lbnSwitch_Click(object sender, EventArgs e)
        {

        }

        protected void btnExcel_Click(object sender, EventArgs e)
        {

        }

        protected void lbtnSee_Click(object sender, EventArgs e)
        {

        }
    }
}
